home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1996 #6 / Amiga Plus CD - 1996 - No. 06.iso / pd / daten / megabook / storage / sendemail / yam.mbrx < prev    next >
Text File  |  1996-07-27  |  2KB  |  75 lines

  1. /*
  2. ** YAM EMail sender for MegaBook 3
  3. ** By Steve Clack (based on a Spot's script by Tom Bampton)
  4. ** Edited slightly by Tom Bampton to use the requester commands in MegaBook
  5. ** (they did't exist when steve wrote the script :)))..)
  6. ** Also added the 'UseSig' stuff.
  7. **
  8. ** © 1996 Eden Software
  9. **
  10. ** This is the script run when the Send EMail option is selected from the
  11. ** Extras menu, please see the docs for creating your own script to use
  12. ** your EMail program.
  13. */
  14.  
  15. /*
  16. This is the path and executable of the Text Editor you prefer to use for
  17. YAM, I am unable to obtain information of the editor from YAM's config
  18. file for now so please change this to suit you.
  19. */
  20. EDITOR = "C:ED"
  21. /*
  22.   If you dont want to use a signature, set this to No, otherwise set it to
  23.   Yes.
  24. */
  25. UseSig = 'Yes'
  26.  
  27. /*
  28. This is the path and executable for YAM, *should* be the same on every
  29. machine because it needs the assign, but if you have renamed the YAM
  30. executable then change it below...
  31. */
  32. YAMMY = "YAM:YAM"
  33.  
  34. parse arg Address
  35.  
  36. /* Check if Yam is running, if not, run it */
  37. if ~show('P', 'YAM') then do
  38.      address command
  39.      'run >nil: ' YAMMY
  40.      /* Wait for the ARexx port */
  41.      do 5 while ~show('P', 'YAM')
  42.           'sys:rexxc/waitforport YAM'
  43.      end
  44. end
  45.  
  46. address 'MEGABOOK.01'
  47. options results
  48.  
  49. GETSTRING "Enter the subject of the EMail"
  50. Subject = result
  51. SELECTFILE "Enter filename of attached binary file"
  52. if RC = 0 then do
  53.     Binary = result
  54.     end
  55. else do
  56.     Binary = ""
  57. end
  58.  
  59. address command
  60.  
  61. if UseSig = 'Yes' then do
  62.     'Copy YAM:.signature T:YAM_NewLetter'
  63. end
  64.  
  65. EDITOR 'T:YAM_NewLetter'
  66.  
  67. address 'YAM'
  68. options results
  69. setfolder 1
  70. writemailto Address
  71. writesubject Subject
  72. 'writeattach "'Binary'"'
  73. writeletter "T:YAM_NewLetter"
  74. writequeue
  75.